using PKGames.AssetBundleSystem;
using System.Collections;
using UnityEngine;

namespace PKGames.SceneManagement
{
	public class StandaloneSceneLoader : SceneLoader
	{
		[HideInInspector]
		public string _sceneToLoad;

        public GameObject startButton;

		private void Start()
		{
			Object.DontDestroyOnLoad(this);
		}

		private IEnumerator WaitAndStartScene()
		{
			yield return MonoSingleton<SceneManagerHelper>.Instance.LoadAssetBundleDependencies(_sceneToLoad);
		}

        public void StartButton()
        {
            startButton.SetActive(false);
            StartCoroutine(WaitAndStartScene());
        }
	}
}
